﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace devtm.Configuration
{

    [Serializable]
    public class MissingConfigurationSectionException : Exception
    {
        public MissingConfigurationSectionException() { }

        private const string DefaultMessage = "Missing configuration '{1}' of type {0}.";

        public MissingConfigurationSectionException(Type sectiontype, string nameSection) : base(string.Format(Thread.CurrentThread.CurrentCulture, DefaultMessage, sectiontype.Name, nameSection)) { }
        public MissingConfigurationSectionException(Type sectiontype, string nameSection, Exception inner) : base(string.Format(Thread.CurrentThread.CurrentCulture, DefaultMessage, sectiontype.Name, nameSection, inner)) { }

        public MissingConfigurationSectionException(string message) : base(message) { }
        public MissingConfigurationSectionException(string message, Exception inner) : base(message, inner) { }
        protected MissingConfigurationSectionException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context)
            : base(info, context) { }
    }
}
